package com.zpark.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

public class Review implements Serializable {
    private Integer rid;
    private Integer pid;
    private Integer uid;
    private String username;
    private String email;
    private String review;
    private String name;
    private String createdUser;
    private Date createdTime;

    public Integer getRid() {
        return rid;
    }

    public void setRid(Integer rid) {
        this.rid = rid;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getReview() {
        return review;
    }

    public void setReview(String review) {
        this.review = review;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCreatedUser() {
        return createdUser;
    }

    public void setCreatedUser(String createdUser) {
        this.createdUser = createdUser;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    @Override
    public String toString() {
        return "Review{" +
                "rid=" + rid +
                ", pid=" + pid +
                ", uid=" + uid +
                ", username='" + username + '\'' +
                ", email='" + email + '\'' +
                ", review='" + review + '\'' +
                ", name='" + name + '\'' +
                ", createdUser='" + createdUser + '\'' +
                ", createdTime=" + createdTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Review review1 = (Review) o;
        return Objects.equals(rid, review1.rid) && Objects.equals(pid, review1.pid) && Objects.equals(uid, review1.uid) && Objects.equals(username, review1.username) && Objects.equals(email, review1.email) && Objects.equals(review, review1.review) && Objects.equals(name, review1.name) && Objects.equals(createdUser, review1.createdUser) && Objects.equals(createdTime, review1.createdTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, pid, uid, username, email, review, name, createdUser, createdTime);
    }
}
